package chapter3.No3_1_等待和通知机制.e当interrupt方法遇到wait方法;

/**
 * *：当执行wait方法的时候，如果线程执行了interrupt方法，
 *    那么会出现InterruptedException异常
 * Created by Administrator on 2016/11/17.
 */
public class Main {
    public static void main(String[] args) throws InterruptedException {
        Object lock = new Object();
        ThreadA a = new ThreadA(lock);
        a.start();
        Thread.sleep(2000);
        a.interrupt();
    }
}
